package com.sgb.member.weight;

import android.annotation.SuppressLint;
import android.content.Context;
import android.view.View;
import android.widget.TextView;

import androidx.annotation.NonNull;

import com.sgb.member.R;
import com.lxj.xpopup.core.CenterPopupView;

import java.util.List;

@SuppressLint("ViewConstructor")
public class MemberTypePopup extends CenterPopupView {

    String str;

    public MemberTypePopup(@NonNull Context context, List<String> list) {
        super(context);
        StringBuilder sb = new StringBuilder();
        if (list != null && list.size() > 0) {
            for (String s : list) {
                sb.append(s).append('、');
            }
        }
        str = sb.toString().substring(0, sb.toString().length() - 1);
    }

    @Override
    protected int getImplLayoutId() {
        return R.layout.dialog_member_type;
    }

    @Override
    protected void onCreate() {
        super.onCreate();
        findViewById(R.id.iv_close).setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });
        ((TextView) findViewById(R.id.tv_msg)).setText(str);
    }
}
